include $(YG_UP)YGInstallation.mk
include $(YG_UP)YGSettings.mk

ifneq ($(V), )
	D = 
else
	D = @
endif

ifeq ($(YG_CRYSTAX),true)
	YG_NDK_TOOLS         = $(YG_NDK_ROOT)/build/prebuilt/linux-x86/arm-eabi-$(YG_NDK_ARM_VER)/bin
	YG_NDK_PATH_SYS_ROOT = $(YG_NDK_ROOT)/build/platforms/android-$(YG_NDK_VER)/arch-arm
	YG_NDK_PATH_INC      = $(YG_NDK_ROOT)/build/platforms/android-$(YG_NDK_VER)/arch-arm/usr/include
	YG_NDK_PATH_LIB      = $(YG_NDK_ROOT)/build/platforms/android-$(YG_NDK_VER)/arch-arm/usr/lib
	YG_NDK_PATH_LIB_ARM  = $(YG_NDK_ROOT)/build/prebuilt/linux-x86/arm-eabi-$(YG_NDK_ARM_VER)/arm-eabi/lib
	YG_NDK_PATH_LIB_GCC  = $(YG_NDK_ROOT)/build/prebuilt/linux-x86/arm-eabi-$(YG_NDK_ARM_VER)/lib/gcc/arm-eabi/4.4.0
	
	YG_COMPILER   = $(YG_NDK_TOOLS)/arm-eabi-g++
	YG_COMPILER_C = $(YG_NDK_TOOLS)/arm-eabi-gcc
	YG_LINKER     = $(YG_NDK_TOOLS)/arm-eabi-g++
	YG_ARCHIVER   = $(YG_NDK_TOOLS)/arm-eabi-ar
	YG_STRIP      = $(YG_NDK_TOOLS)/arm-eabi-strip
else
	YG_NDK_TOOLS         = $(YG_NDK_ROOT)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
	YG_NDK_PATH_SYS_ROOT = $(YG_NDK_ROOT)/platforms/android-$(YG_NDK_VER)/arch-arm
	YG_NDK_PATH_INC      = $(YG_NDK_ROOT)/platforms/android-$(YG_NDK_VER)/arch-arm/usr/include
	YG_NDK_PATH_LIB      = $(YG_NDK_ROOT)/platforms/android-$(YG_NDK_VER)/arch-arm/usr/lib
	YG_NDK_PATH_LIB_ARM  = $(YG_NDK_ROOT)/toolchains/arm-eabi-$(YG_NDK_ARM_VER)/prebuilt/linux-x86/lib
	YG_NDK_PATH_LIB_GCC  = $(YG_NDK_ROOT)/toolchains/arm-eabi-$(YG_NDK_ARM_VER)/prebuilt/linux-x86/lib/gcc/arm-eabi/$(YG_NDK_ARM_VER)
	
	YG_COMPILER   = $(YG_NDK_TOOLS)/arm-linux-androideabi-g++
	YG_COMPILER_C = $(YG_NDK_TOOLS)/arm-linux-androideabi-gcc
	YG_LINKER     = $(YG_NDK_TOOLS)/arm-linux-androideabi-g++
	YG_ARCHIVER   = $(YG_NDK_TOOLS)/arm-linux-androideabi-ar
	YG_STRIP      = $(YG_NDK_TOOLS)/arm-linux-androideabi-strip
endif

YG_BIN      = bin
YG_INT      = int
YG_SRC      = src
YG_PATH_LIB = $(YG_NDK_PATH_LIB)

YG_SOURCES      = $(wildcard $(YG_SRC)/*.cpp)
YG_OBJECTS      = $(patsubst $(YG_SRC)/%.cpp, $(YG_INT)/%.o, $(YG_SOURCES))
YG_INTERMEDIATE = $(wildcard $(YG_INT)/*.o)
